<template>
	<div>
		<ul>
			<li @click="list.show = !list.show" v-for="(list, index) in lists" :key="index">
				<h2>{{ list.name }}</h2>
				
				<h3 v-show="list.show">
					{{ list.age }}
				</h3>
			</li>
		</ul>
		<button @click="deleteList">点击删除</button>
	</div>
</template>

<script>
	export default {
		props: ['lists'],
		data() {
			return {
				//
			}
		},
		methods:{
			deleteList() {
				this.lists.pop()
			}
		}
	}
</script>

<style>
</style>
